<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统导航首页</title>
    <!-- 引入 Layui CSS -->
    {#<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui@2.6.8/dist/css/layui.min.css">#}
    <link rel="stylesheet" href="{{ url_for('static', filename='layui/css/layui.css') }}">
    <style>
        body {
            background-color: #f2f2f2;
            font-family: "Microsoft YaHei", sans-serif;
        }

        .header {
            text-align: center;
            padding: 30px 0;
            background: linear-gradient(135deg, #1E9FFF 0%, #0166dc 100%);
            color: white;
            margin-bottom: 20px;
        }

        .logo {
            font-size: 36px;
            font-weight: bold;
            letter-spacing: 2px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .search-box {
            max-width: 600px;
            margin: 20px auto;
        }

        .category {
            background-color: #fff;
            border-radius: 4px;
            padding: 15px;
            margin-bottom: 20px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        .category-title {
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid #1E9FFF;
            padding-left: 10px;
            margin-bottom: 15px;
            color: #333;
        }

        .site-card {
            text-align: center;
            padding: 15px 5px;
            transition: all 0.3s;
            border-radius: 4px;
        }

        {#.site-card:hover {
            background-color: #FF5722;
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }#}

        .site-icon {
            font-size: 36px;
            margin-bottom: 10px;
            color: #1E9FFF;
        }

        .site-name {
            font-size: 14px;
            color: #333;
        }

        .site-name:hover {
            background-color: #FF5722; /* 悬停时的背景颜色 */
        }


        .footer {
            text-align: center;
            padding: 20px;
            color: #999;
            font-size: 14px;
        }

        .custom-card {
            width: 220px;
            height: 135px;
            background-color: #f8f8f8;
            border-radius: 6px;
            padding: 10px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            cursor: pointer;
        }

        /* 鼠标悬停效果 */
        .custom-card:hover {
            background-color: #e8f4ff;
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(74, 144, 226, 0.2);
        }

        .custom-icon {
            font-size: 32px;
            color: #1E9FFF;
            margin-bottom: 10px;
        }

        .custom-title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
        }

        .custom-desc {
            font-size: 12px;
            color: #666;
            line-height: 1.6;
        }
    </style>
</head>
<body>
<!-- 顶部标题栏 -->
<div class="header">
    <div class="logo">系统导航中心</div>
    {#<div class="search-box">
        <div class="layui-form">
            <div class="layui-input-inline" style="width: 80%;">
                <input type="text" id="searchInput" placeholder="请输入系统名称或关键词..." autocomplete="off"
                       class="layui-input">
            </div>
            <div class="layui-input-inline">
                <button class="layui-btn layui-btn-normal" onclick="searchSite()">
                    <i class="layui-icon layui-icon-search"></i> 搜索
                </button>
            </div>
        </div>
    </div>#}
</div>

<div class="layui-container">
    <!-- 办公系统 -->
    <div class="category">
        <div class="category-title">常用办公信息</div>
        <div class="layui-row layui-col-space20">
            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <a class="custom-card" href="https://onebox.huawei.com/v/e44ca006175216f90c43b15e665c1dff?type=0"
                   target="_blank">
                    {#<i class="layui-icon custom-icon">&#xe62d;</i>#}
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/all_info.svg') }}"
                             alt="Icon"
                             width="35"
                             height="50.67">
                    </i>
                    <h3 class="custom-title">TPC数据涉及信息汇总</h3>
                    <p class="custom-desc">Jalor公服在线文档模板<br>脚本生成器、类生产拉数详细步骤</p>
                </a>
            </div>

            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <a class="custom-card" href="/tpc_db_info/" target="_blank">
                    {#<i class="layui-icon custom-icon">&#xe672;</i> #}<!-- Layui 的图标 -->
                    {#<i class="layui-icon custom-icon">&#xe656;</i>#}
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/databases.svg') }}"
                             alt="Icon"
                             width="40"
                             height="50.67">
                    </i>
                    <h3 class="custom-title">数据库环境汇总</h3>
                    <p class="custom-desc">所有数据库环境信息<br>需要授权</p>
                </a>
            </div>

            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <a class="custom-card" href="/dms/" target="_blank">
                    {#<i class="layui-icon custom-icon">&#xe672;</i> #}<!-- Layui 的图标 -->
                    {#<i class="layui-icon custom-icon">&#xe621;</i>#}
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/permissions_no.svg') }}"
                             alt="Icon"
                             width="150"
                             height="50.67">
                    </i>
                    <h3 class="custom-title">权限矩阵文档管理系统</h3>
                    <p class="custom-desc">权限矩阵在线文档<br>需要授权</p>
                </a>
            </div>

        </div>
    </div>

    <!-- 生产系统 -->
    <div class="category">
        <div class="category-title">运维分析工具</div>
        <div class="layui-row layui-col-space20">
            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <a class="custom-card" href="/sfat" target="_blank">
                    {#<i class="layui-icon custom-icon">&#xe60a;</i>#}
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/analyze_tool.svg') }}"
                             alt="Icon"
                             width="40"
                             height="50.67">
                    </i>
                    <h3 class="custom-title">SQL文件分析工具</h3>
                    <p class="custom-desc">上传SQL文件<br>分析SQL文件的合法性</p>
                </a>
            </div>

        </div>
    </div>

    <!-- 开发运维 -->
    <div class="category">
        <div class="category-title">开发运维系统</div>
        <div class="layui-row layui-col-space20">
            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <!-- 自定义卡片 -->
                <a class="custom-card" href="/dcs" target="_blank">
                    {#<i class="layui-icon custom-icon">&#xe672;</i>#}
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/compare_system.svg') }}"
                             alt="Icon"
                             width="45"
                             height="50.67">
                    </i>
                    <h3 class="custom-title">数据库比对系统</h3>
                    <p class="custom-desc">针对openGauss、PostgreSQL<br>比对表模型、索引、函数、序列、授权</p>
                </a>
            </div>

            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <!-- 自定义卡片 -->
                <a class="custom-card" href="/mwp" target="_blank">
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/monitor_warning.svg') }}"
                             alt="Icon"
                             width="45"
                             height="40">
                    </i>
                    <h3 class="custom-title">监控预警平台</h3>
                    <p class="custom-desc">对DB、文档、业务场景<br>监控数据安全及邮件预警机制
                    </p>
                </a>
            </div>

            <div class="layui-col-md3 layui-col-sm4 layui-col-xs6">
                <!-- 自定义卡片 -->
                <a class="custom-card" href="/dmp" target="_blank">
                    <i class="layui-icon custom-icon">
                        <img src="{{ url_for('static', filename='icons/data_migration.svg') }}"
                             alt="Icon"
                             width="45"
                             height="40">
                    </i>
                    <h3 class="custom-title">数据迁移平台</h3>
                    <p class="custom-desc">整库迁移<br>openGauss库到openGauss库
                    </p>
                </a>
            </div>

        </div>
    </div>
</div>

<div class="footer">
    © 2025 系统导航中心 | 共收录 6 个系统
</div>

<!-- 引入 Layui JS -->
{#<script src="https://cdn.jsdelivr.net/npm/layui@2.6.8/dist/layui.min.js"></script>#}
<script src="{{ url_for('static', filename='layui/layui.js') }}"></script>
<script>
    // 搜索功能实现
    function searchSite() {
        const keyword = document.getElementById('searchInput').value.trim().toLowerCase();
        if (!keyword) return;

        // 在实际项目中这里应该是AJAX请求
        // 这里简单模拟搜索效果
        const sites = document.querySelectorAll('.site-name');
        let found = false;

        sites.forEach(site => {
            const siteName = site.textContent.toLowerCase();
            const card = site.closest('.site-card');

            if (siteName.includes(keyword)) {
                card.style.backgroundColor = '#e6f7ff';
                card.scrollIntoView({behavior: 'smooth', block: 'center'});
                found = true;
            } else {
                card.style.backgroundColor = '';
            }
        });

        if (!found) {
            layer.msg('未找到匹配的系统', {icon: 3});
        }
    }

    // 按回车键搜索
    document.getElementById('searchInput').addEventListener('keyup', function (e) {
        if (e.key === 'Enter') searchSite();
    });

    // 初始化Layui模块
    layui.use(function () {
        // 可以在这里初始化其他组件
    });
</script>
</body>
</html>
